<include file="Public:header"/>
<link href="__PUBLIC__/Catalog/css/ordersContent.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="main">
   <div class="title">
         <div class="title1">
             <a href="{$back}" id="back"> < </a>订单详情
         </div>
   </div>
   <div class="jiaoyi">
      <dl>
         <dt>{$orderDetail.products_name}</dt>
         <dd>下单时间:{$orderDetail.order_date_added}</dd>
         <dd>订单编号:{$orderDetail.order_num}</dd>
         <dd>卖家用户:{$orderDetail.contact_person} {$orderDetail.contact_tel}</dd>
         <dd>交易方式: <span style="color: #09C"><if condition="$orderDetail['order_type'] eq 1">线下交易<else/>在线交易</if></span></dd>
         <dd><if condition="$orderDetail['products_type'] eq 3">商品类型:公益品<else/>单价: <strong style="color:red;">{$orderDetail.pay_price}元</strong></if></dd>
      </dl>
   </div>
   <if condition="$orderDetail['order_type'] eq 0">
   <div class="jiaoyi2">
      <dl>
         <dt>收货信息:</dt>
         <dd>收件人: <span style="color: #09C">{$orderDetail.shipping_lastname}</span></dd>
         <dd>电话:{$orderDetail.tel}</dd>
         <dd style="min-height:50px;">地址:{$orderDetail.shipping_address_1}-{$orderDetail.shipping_address_2}</dd>
         
         <dd style="border-top:1px solid #CCC;">快递单号: <strong style="color:red;">{$orderDetail.delivery_num}</strong></dd>
         <dd>快递公司:{$orderDetail.delivery_company}</dd>
      </dl>
   </div>
   </if>
   <div class="jiaoyi2" style="min-height:500px;">
      <dl>
         <dt>快递信息:</dt>
         <if condition="$flag eq 1">
         <dd>暂时没有快递信息</dd>
         <else/>
	         <foreach name="relivery" item="vo">
	         	<dd style="height:40px;">{$vo.time}&nbsp;&nbsp;{$vo.context}</dd>
	         </foreach>
         </if>
         
      </dl>
   </div>
   <div class="remark">
      备注信息: <strong style="color:red;">{$orderDetail.comment}</strong>
   </div>
   
  <!--  <div class="sub">
       <a href="#">收货评价</a>
       <a href="{:U('Order/report')}?orderId={$orderDetail.order_id}">订单申诉</a>
   </div> -->
</div>

<script type="text/javascript"> 
window.onload = function (){

	var oStar = document.getElementById("star");
	var aLi = oStar.getElementsByTagName("li");
	var oUl = oStar.getElementsByTagName("ul")[0];
	var oSpan = oStar.getElementsByTagName("span")[1];
	var oP = oStar.getElementsByTagName("p")[0];
	var i = iScore = iStar = 0;
	var aMsg = [
				"很不满意|差得太离谱，与卖家描述的严重不符，非常不满",
				"不满意|部分有破损，与卖家描述的不符，不满意",
				"一般|质量一般，没有卖家描述的那么好",
				"满意|质量不错，与卖家描述的基本一致，还是挺满意的",
				"非常满意|质量非常好，与卖家描述的完全一致，非常满意"
				]
	
	for (i = 1; i <= aLi.length; i++){
		aLi[i - 1].index = i;
		
		//鼠标移过显示分数
		aLi[i - 1].onmouseover = function (){
			fnPoint(this.index);
			//浮动层显示
			oP.style.display = "block";
			//计算浮动层位置
			oP.style.left = oUl.offsetLeft + this.index * this.offsetWidth - 104 + "px";
			//匹配浮动层文字内容
			oP.innerHTML = "<em><b>" + this.index + "</b> 分 " + aMsg[this.index - 1].match(/(.+)\|/)[1] + "</em>" + aMsg[this.index - 1].match(/\|(.+)/)[1]
		};
		
		//鼠标离开后恢复上次评分
		aLi[i - 1].onmouseout = function (){
			fnPoint();
			//关闭浮动层
			oP.style.display = "none"
		};
		
		//点击后进行评分处理
		aLi[i - 1].onclick = function (){
			iStar = this.index;
			oP.style.display = "none";
			oSpan.innerHTML = "<strong>" + (this.index) + " 分</strong> (" + aMsg[this.index - 1].match(/\|(.+)/)[1] + ")"
		}
	}
	
	//评分处理
	function fnPoint(iArg){
		//分数赋值
		iScore = iArg || iStar;
		for (i = 0; i < aLi.length; i++) aLi[i].className = i < iScore ? "on" : "";	
	}
	
};
</script>
<include file="Public:footer" />
